//用户模块
export default {
    namespaced: true,
    state() {
        return {
            // 后台接口一致 用户信息
            profile: {
                id: '',
                account: '',
                avatar: '',
                nickname: '',
                accunt: '',
                mobile: '',
                token: ''
            },
            // 登录后的回退地址
            redirectUrl: '/'
        }
    },
    mutations: {
        setUser(state, payload) {
            state.profile = payload
        },
        setRedirectUrl(state, payload) {
            state.redirectUrl = payload
        },

    }
}